class messagebean {
  bool success;
  String message;
  int code;
  Result result;
  int timestamp;

  messagebean(
      {this.success, this.message, this.code, this.result, this.timestamp});

  messagebean.fromJson(Map<String, dynamic> json) {
    success = json['success'];
    message = json['message'];
    code = json['code'];
    result =
    json['result'] != null ? new Result.fromJson(json['result']) : null;
    timestamp = json['timestamp'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['success'] = this.success;
    data['message'] = this.message;
    data['code'] = this.code;
    if (this.result != null) {
      data['result'] = this.result.toJson();
    }
    data['timestamp'] = this.timestamp;
    return data;
  }
}

class Result {
  List<Records> records;
  int total;
  int size;
  int current;
  bool searchCount;
  int pages;

  Result(
      {this.records,
        this.total,
        this.size,
        this.current,
        this.searchCount,
        this.pages});

  Result.fromJson(Map<String, dynamic> json) {
    if (json['records'] != null) {
      records = new List<Records>();
      json['records'].forEach((v) {
        records.add(new Records.fromJson(v));
      });
    }
    total = json['total'];
    size = json['size'];
    current = json['current'];
    searchCount = json['searchCount'];
    pages = json['pages'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.records != null) {
      data['records'] = this.records.map((v) => v.toJson()).toList();
    }
    data['total'] = this.total;
    data['size'] = this.size;
    data['current'] = this.current;
    data['searchCount'] = this.searchCount;
    data['pages'] = this.pages;
    return data;
  }
}

class Records {
  String alertStatus;
  String alertProperty;
  String alertType;
  String companyName;
  String alertLevel;
  String lineName;
  int recordId;
  String operatePerson;
  int alarmStatus;
  String alertDescribe;
  String meterId;
  int id;
  String operateDate;
  String alertEndTime;
  String alertStartTime;

  Records(
      {this.alertStatus,
        this.alertProperty,
        this.alertType,
        this.companyName,
        this.alertLevel,
        this.lineName,
        this.recordId,
        this.operatePerson,
        this.alarmStatus,
        this.alertDescribe,
        this.meterId,
        this.id,
        this.operateDate,
        this.alertEndTime,
        this.alertStartTime});

  Records.fromJson(Map<String, dynamic> json) {
    alertStatus = json['alertStatus'];
    alertProperty = json['alertProperty'];
    alertType = json['alertType'];
    companyName = json['companyName'];
    alertLevel = json['alertLevel'];
    lineName = json['lineName'];
    recordId = json['recordId'];
    operatePerson = json['operatePerson'];
    alarmStatus = json['alarmStatus'];
    alertDescribe = json['alertDescribe'];
    meterId = json['meterId'];
    id = json['id'];
    operateDate = json['operateDate'];
    alertEndTime = json['alertEndTime'];
    alertStartTime = json['alertStartTime'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['alertStatus'] = this.alertStatus;
    data['alertProperty'] = this.alertProperty;
    data['alertType'] = this.alertType;
    data['companyName'] = this.companyName;
    data['alertLevel'] = this.alertLevel;
    data['lineName'] = this.lineName;
    data['recordId'] = this.recordId;
    data['operatePerson'] = this.operatePerson;
    data['alarmStatus'] = this.alarmStatus;
    data['alertDescribe'] = this.alertDescribe;
    data['meterId'] = this.meterId;
    data['id'] = this.id;
    data['operateDate'] = this.operateDate;
    data['alertEndTime'] = this.alertEndTime;
    data['alertStartTime'] = this.alertStartTime;
    return data;
  }
}
